import { defineStore } from 'pinia'

export const useSiteConfig = defineStore('siteConfig', {
    state: () => {
        return {
            siteName: '',
            recordNumber: '',
            version: '1.0.0',
            callBackMode:'web',//['pyview','web']
            cdnUrl: '',
            apiUrl: 'http://192.168.2.8:8000/',
            upload: {
                mode: 'local',
                maxsize: 200,
                mimetype: '',
                savename: '',
            },
            headNav: [],
            initialize: true,
            userInitialize: true,
        }
    },
    actions: {
        dataFill(state) {
            this.$state = state
        },
        setHeadNav(headNav) {
            this.headNav = headNav
        },
        setInitialize(initialize) {
            this.initialize = initialize
        },
        setUserInitialize(userInitialize) {
            this.userInitialize = userInitialize
        },
    },
})
